﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace TeZhanDui
{
    public class CardParameters
    {
        public static int ALL_CARD_COUNT = 198;
        public static int PER_PLAYER_CARD_COUNT = 8;
    }

    public class CardPository
    {
        public List<int> cards { get; set; }
        public int curCard { get; set; }
        
        void GenerateFlashCards ()
        {
            for (int i = 1; i <= CardParameters.ALL_CARD_COUNT; i++)
            {
                cards.Add(i);
            }

            //wash cards
            int x = 0, tmp = 0;
            Random random = new Random();
            for (int i = cards.Count - 1; i > 0; i--)
            {
                x = random.Next(0, i + 1);
                tmp = cards[i];
                cards[i] = cards[x];
                cards[x] = tmp;
            }
        }
        
        public CardPository()
        {
            cards = new List<int>();
            GenerateFlashCards();
            curCard = 0;
        }
    }
}
